package cn.tedu.baking.security;

import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Getter
public class CustomUserDetails extends User {
    private Long id;
    private String nickname;
    private String imgUrl;
    private Integer isAdmin;

    public CustomUserDetails(Integer isAdmin,String imgUrl,Long id,String nickname,String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
        this.imgUrl = imgUrl;
        this.id=id;
        this.nickname=nickname;
        this.isAdmin=isAdmin;
    }
}
